<template>
  <van-row>
    <van-row>
      <van-nav-bar left-arrow @click-left="$router.replace('/user')">
      </van-nav-bar>
    </van-row>
    <van-row>
      <van-col :span="24">
        <van-cell>
          <template>
            <van-button type="default" round hairline size="large" block @click="$router.push('/updpw')">修改密码
            </van-button>
          </template>
        </van-cell>
      </van-col>
    </van-row>
    <van-row>
      <van-col :span="24">
        <van-cell>
          <template>
            <van-button type="default" round hairline size="large" block @click="$router.push('/ov')">组织邀请
            </van-button>
          </template>
        </van-cell>
      </van-col>
    </van-row>
    <van-row>
      <van-col :span="24">
        <van-cell>
          <template>
            <van-button hairline round color="linear-gradient(to right, #ff6034, #ee0a24)" size="large" block
              @click="onLoginOut">退出
            </van-button>
          </template>
        </van-cell>
      </van-col>
    </van-row>
  </van-row>
</template>

<script>
  import {
    Row,
    Col,
    Cell,
    Button,
    NavBar
  } from 'vant'
  export default {
    name: "systemindex",
    describute: "系统设置页面",
    data() {
      return {

      }
    },
    components: {
      'van-row': Row,
      'van-col': Col,
      'van-cell': Cell,
      'van-button': Button,
      'van-nav-bar': NavBar,
    },
    methods: {
      //退出操作
      async onLoginOut() {
        //移除用户信息
        await this.$user.removeUser();
        //断开websocket连接
        this.$taskSocket.disconnect();
        //退出登录
        this.$oidcClient.signOut();
        //刷新
        // this.$router.replace('/login');
      }
    },
    mounted() {
      //发布消息 提示是否显示底部栏
      this.$eventBus.publish('isShowFoot', false);
        //更改页面底部的状态
      this.$store.commit('updatetTabberActive', 'user')
    }
  }

</script>
